package com.example.mybatisplus.utils;

public class UserContextHolder {

    private static final ThreadLocal<Boolean> userLoginFlag = new ThreadLocal<>();

    public static void set(Boolean flag) {
        userLoginFlag.set(flag);
    }

    public static Boolean get() {
        return userLoginFlag.get();
    }

    public static void clear() {
        userLoginFlag.remove();
    }
}
